package com.onpositive.wiki3.db.catmodel.matches;

import com.onpositive.wiki3.db.catmodel.Category;
import com.onpositive.wiki3.db.catmodel.ICategoryMatcher;

public class ListRemover implements ICategoryMatcher{

	public int count=0;
	
	@Override
	public int accept(Category st) {
		String title=st.toString();
		if (title.startsWith("list")){
			//System.out.println("A");
			System.out.println(title);
		}
		
		if (title.startsWith("list_of_")){
			count++;
			st.remove();
			
		}
		if (title.startsWith("lists_of_")){
			count++;
			st.remove();
			
		}
		if (title.startsWith("lists_by_")){
			st.remove();
			count++;
			
		}
		if (title.endsWith("_lists")){
			count++;
			st.remove();
		}
		if (title.endsWith("_portal")){
			count++;
			st.remove();
		}
		if (title.endsWith("_portals")){
			count++;
			st.remove();
		}
		return 0;
	}

}
